<%DIRECTIVE DYNAMIC;%>
<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal" aria-label="Close">
		<span aria-hidden="true">&times;</span>
	</button>
	<h5 class="modal-title">修改</h5>
</div>

<form id="editForm" role="form" class="form-horizontal parsley-form" data-parsley-validate action="${base}/platform/region/editDo" method="post">
	<div class="modal-body ">
		<input type="hidden" name="id" value="${obj.id!}"> 
		<input type="hidden" name="createAt" value="${obj.createAt!}"> 
		<input type="hidden" name="createBy" value="${obj.createBy!}">
		<div class="row mb10">
			<div class="col-lg-12">
				<div class="form-group">
					<label for="name" class="col-sm-2 control-label">名称</label>
	
					<div class="col-sm-8">
						<input type="text" id="name" class="form-control" name="name"
							value="${obj.name!}" data-parsley-required="true" placeholder="名称">
					</div>
				</div>
				<div class="form-group">
					<label for="code" class="col-sm-2 control-label">编码</label>
	
					<div class="col-sm-8">
						<input type="text" id="code" class="form-control" name="code"
							value="${obj.code!}" placeholder="编码">
					</div>
				</div>
				<div class="form-group">
					<label for="memo" class="col-sm-2 control-label">备注</label>
	
					<div class="col-sm-8">
						<textarea rows="5" cols="5" id="memo" class="form-control"
							name="memo" data-parsley-required="true"
							data-parsley-maxlength="5000" placeholder="备注">${obj.memo!}</textarea>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="modal-footer">
		<button  class="btn btn-default btn-sm btn-parsley"  >完成</button> 
	</div>
</form>


<script language="JavaScript">
	$(document).ready(function() {
		var dialog=$("#editModal");
		$("#editModalDialog").draggable();
		$('#editForm').ajaxForm({
			dataType : 'json',
			beforeSubmit : function(arr, form, options) {
			},
			success : function(data, statusText, xhr, form) {
				if (data.code == 0) {
                    Toast.success(data.msg);
                    datatable.ajax.reload();
	               	dialog.modal("hide");
                } else {
                    Toast.error(data.msg);
                    datatable.ajax.reload();
                 	dialog.modal("hide");
                }
			}
		});
	});
</script>
